package com.yuwenxin.bean;

import com.yuwenxin.bean.absBean.Singer;

import java.util.Date;
import java.util.HashSet;
import java.util.List;

public class Music {
    /**
     * 记录外键量:
     * Album, MusicList, Singer, Poster 一共四个
     * Category 多对多 使用关联表查询
     */
    private int id,playNum,likeNum,collectNum;
    private String musicName,lyrics;
    private String musicPhotoPath;
    private String filePath;
    private Date postDate;

//    private int originSingerId;
//    private Singer originSinger;
    private int belongedAlbumId,posterId,belongedCombinationId,belongedMusicianId,belongedMusiclistId;
    private User poster;
    private Album album;
    private MusicList musicList;
    private List<Singer> singers;  // 演唱者包含了翻唱者，并且翻唱者可能有多个翻唱版本
    private List<Comment> comments;  // 一对多关系:在一的那方创建一个对象容器
    private HashSet<Category> categories = new HashSet<>();



    public int getPosterId() {
        return posterId;
    }

    public void setPosterId(int posterId) {
        this.posterId = posterId;
    }

    public MusicList getMusicList() {
        return musicList;
    }

    public void setMusicList(MusicList musicList) {
        this.musicList = musicList;
    }

    public int getBelongedAlbumId() {
        return belongedAlbumId;
    }

    public void setBelongedAlbumId(int belongedAlbumId) {
        this.belongedAlbumId = belongedAlbumId;
    }

    public int getBelongedCombinationId() {
        return belongedCombinationId;
    }

    public void setBelongedCombinationId(int belongedCombinationId) {
        this.belongedCombinationId = belongedCombinationId;
    }

    public int getBelongedMusicianId() {
        return belongedMusicianId;
    }

    public void setBelongedMusicianId(int belongedMusicianId) {
        this.belongedMusicianId = belongedMusicianId;
    }

    public int getBelongedMusiclistId() {
        return belongedMusiclistId;
    }

    public void setBelongedMusiclistId(int belongedMusiclistId) {
        this.belongedMusiclistId = belongedMusiclistId;
    }

    public String getMusicPhotoPath() {
        return musicPhotoPath;
    }

    public void setMusicPhotoPath(String musicPhotoPath) {
        this.musicPhotoPath = musicPhotoPath;
    }
    public HashSet<Category> getCategories() {
        return categories;
    }

    public void setCategories(HashSet<Category> categories) {
        this.categories = categories;
    }

    public List<Comment> getComments() {
        return comments;
    }

    public void setComments(List<Comment> comments) {
        this.comments = comments;
    }

    public String getLyrics() {
        return lyrics;
    }

    public void setLyrics(String lyrics) {
        this.lyrics = lyrics;
    }

    public User getPoster() {
        return poster;
    }

    public void setPoster(User poster) {
        this.poster = poster;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    public List<Singer> getSingers() {
        return singers;
    }

    public void setSingers(List<Singer> singers) {
        this.singers = singers;
    }

    public Date getPostDate() {
        return postDate;
    }

    public void setPostDate(Date postDate) {
        this.postDate = postDate;
    }

    public Album getAlbum() {
        return album;
    }

    public void setAlbum(Album album) {
        this.album = album;
    }

    public int getLikeNum() {
        return likeNum;
    }

    public void setLikeNum(int likeNum) {
        this.likeNum = likeNum;
    }

    public int getCollectNum() {
        return collectNum;
    }

    public void setCollectNum(int collectNum) {
        this.collectNum = collectNum;
    }

    public int getPlayNum() {
        return playNum;
    }

    public void setPlayNum(int playNum) {
        this.playNum = playNum;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getMusicName() {
        return musicName;
    }

    public void setMusicName(String musicName) {
        this.musicName = musicName;
    }

    @Override
    public String toString() {
        return "Music{" +
                "id=" + id +
                ", playNum=" + playNum +
                ", likeNum=" + likeNum +
                ", collectNum=" + collectNum +
                ", musicName='" + musicName + '\'' +
                ", lyrics='" + lyrics + '\'' +
                ", musicPhotoPath='" + musicPhotoPath + '\'' +
                ", filePath='" + filePath + '\'' +
                ", postDate=" + postDate +
                ", belongedAlbumId=" + belongedAlbumId +
                ", posterId=" + posterId +
                ", belongedSingerId=" + belongedCombinationId + "," + belongedMusicianId +
                ", belongedMusiclistId=" + belongedMusiclistId +
                ", poster=" + poster +
                ", album=" + album +
                ", musicList=" + musicList +
                ", singers=" + singers +
                ", comments=" + comments +
                ", categories=" + categories +
                '}';
    }

    //    public int getOriginSingerId() {
//        return originSingerId;
//    }
//
//    /**
//     * !!!!!这个方法还没实现！！！！！
//     * @param originSingerId
//     */
//    public void setOriginSingerId(int originSingerId) {
//        this.originSingerId = originSingerId;
//    }

    //    public Singer getOriginSinger() {
//        return originSinger;
//    }
//
//    public void setOriginSinger(Singer originSinger) {
//        this.originSinger = originSinger;
//    }

}
